package com.tgy;

import com.tgy.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/***
 * @ClassName: UserTestBeans
 * @Description:
 * @Auther: 送一一块二向箔
 * @Date: 17:05 2021/12/16
 * @version : V1.0
 */
public class UserTestBeans {
    public static void main(String[] args) {
        //拿到Spring容器
        ApplicationContext context = new ClassPathXmlApplicationContext("IOCBeans.xml");
        UserService userService = (UserService) context.getBean("userServiceImpl");
        userService.getUser();

    }
}
